/*
 * Copyright (c) 2003-2020 EliteCRM All Rights Reserved.
 * ProjectName: elite.ngs
 * FileName: elite.worker.js
 * Date: 2021/5/27 上午10:33
 * Author: Lori
 */
self.addEventListener('message', function (e) {
    console.log('Elite worker received message ' + JSON.stringify(e.data));
    if (e.data.cmd && e.data.timeout) {
        setTimeout(() => {
            self.postMessage({
                action: e.data.cmd
            })
        }, e.data.timeout);
    }
}, false);

self.addEventListener('error', function (e) {
    console.log('Received error ' + e);
}, false);